load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "const.go",
        "cron_schedule.go",
        "label.go",
        "parameter_formatter.go",
        "periodic_schedule.go",
        "scheduled_workflow.go",
    ],
    importpath = "github.com/kubeflow/pipelines/backend/src/crd/controller/scheduledworkflow/util",
    visibility = ["//visibility:public"],
    deps = [
        "//backend/src/common/util:go_default_library",
        "//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
        "@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
        "@com_github_argoproj_argo//workflow/common:go_default_library",
        "@com_github_pkg_errors//:go_default_library",
        "@com_github_robfig_cron//:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/labels:go_default_library",
        "@io_k8s_apimachinery//pkg/selection:go_default_library",
        "@io_k8s_kubernetes//pkg/apis/core:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "cron_schedule_test.go",
        "parameter_formatter_test.go",
        "periodic_schedule_test.go",
        "scheduled_workflow_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//backend/src/common/util:go_default_library",
        "//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
        "@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
        "@com_github_stretchr_testify//assert:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_kubernetes//pkg/apis/core:go_default_library",
    ],
)
